SQL Serverのバックアップ・リストアコマンド
code:sql
RESTORE VERIFYONLY FROM DISK = 'C:\path\to\SampleDB.bak';
code:sql
RESTORE FILELISTONLY FROM DISK = 'C:\path\to\SampleDB.bak';
試行錯誤の不完全版
code:sql
TO DISK = 'C:\path\to\SampleDB.bak'
WITH INIT;
code:sql
TO DISK = 'C:\path\to\SampleDB.trn'
WITH NOFORMAT, NOINIT, NAME = 'test', SKIP, NOREWIND, NOUNLOAD, STATS = 10;
code:sql
FROM DISK = 'C:\path\to\SampleDB.bak'
WITH MOVE 'SampleDB' TO 'C:\path\to\MSSQL14.MSSQLSERVER\MSSQL\DATA\SampleDB.mdf',
MOVE 'SampleDB_log' TO 'C:\path\to\MSSQL14.MSSQLSERVER\MSSQL\DATA\SampleDB_log.ldf',
REPLACE;